无效使用 Null : "replace" 的问题

来源:百度知道 编辑:UC知道 时间:2024/05/15 09:03:42
代码部分

If Rs(9, i) > 1024 Then
s = Replace(s, "{$softsize}", Round(Rs(9, i) / 1024, 2) & " MB")
Else
s = Replace(s, "{$softsize}", Rs(9, i) & " KB")
End If
s = Replace(s, "{$excerpt}", Rs(13, i))
tempStr = tempStr & s
s = Null
Next
Rs = Null
Set sqlRs = Nothing
End If
s = Replace(s, "{$excerpt}", Rs(13, i))

报错行

加上
if not isnull({$excerpt}) then
s = Replace(s, "{$excerpt}", Rs(13, i))

报错

Microsoft VBScript 编译器错误 (0x800A0408)
无效字符
/site/softdown/cls_MakeHtml.asp, line 1134, column 14
if not isnull({$excerpt}) then

s = Replace(s, "{$excerpt}", Rs(13, i))

{$excerpt}这个东西为NULL,不存在,没有值,也不是为空({$excerpt}="",错)

不存在,什么都不是.....=NULL

可先作判断
if not isnull({$excerpt}) then
s = Replace(s, "{$excerpt}", Rs(13, i))
else
......
end if

Rs(9, i)

这个东西真的存在么 ...?

关注中...